﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OneMG.Phoenix.Service.Model;
using OneMG.Phoenix.Service.Contracts;
using OneMG.Phoenix.Service;

namespace OneMG.Phoenix.AdminSite.Views.Passport
{
    public partial class RightsEdit : System.Web.UI.Page
    {
        IRightsTypeService IRightsType = new RightsTypeService();
        IRightsService IRights = new RightsService();
        public IList<RightsTypeModel> RightsTypeList = new List<RightsTypeModel>();
        public RightsModel objRights;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                 RightsTypeList = IRightsType.GetAll();

                if (!string.IsNullOrEmpty(Request.QueryString["rid"]))
                {
                   int  rightID = int.Parse(Request.QueryString["rid"]);

                   objRights = IRights.GetByRightID(rightID);
                }

            }


        }
    }
}
